<!--script/apps/Aries/Creator/Game/Code/CodeBlockSettings.html-->
<pe:mcml>
<script type="text/npl" refresh="false" src="CodeBlockSettings.lua">
<![CDATA[
CodeBlockSettings = commonlib.gettable("MyCompany.Aries.Game.Code.CodeBlockSettings");
CodeBlockSettings.OnInit();

function ClosePage()
    Page:CloseWindow();
end

]]></script>

<aries:window mode="thin" title='<%=L"代码方块设置"%>' uiname_onclose="CodeBlockSettings.ClosePage" onclose="ClosePage">
<div width="100%" style="padding:5px;color:#cccccc;margin-right:10x;">
    <div style="margin-bottom:10px;">
        <div style="float:left"><%=L"编程语言:"%></div>
        <div style="float:left">
            <select uiname="CodeBlockSettings.language" name="language" style="height:25px;margin-top:-1px;" onselect="CodeBlockSettings.OnSelectLang" AllowUserEdit="false">
                <option value="" selected="selected">NPL</option>
                <option value="npl_cad">CAD</option>
                <option value="mcml">MCML UI</option>
                <option value="commands">commands</option>
                <option value="npl_blockpen">pen</option>
                <option value="npl_teacher">Teacher</option>
                <option value="microbit">Microbit</option>
                <option value="npl_camera">Camera</option>
            </select>
            <input type="button" style="margin-left:5px" class="button" uiname="CodeBlockSettings.btnChangeLang" name="btnChangeLang" value='<%=L"自定义语言..."%>' onclick="CodeBlockSettings.OnClickCustomLanguage"/>
        </div>
    </div>
    <!--<div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.isAutoActiveActor" name="isAutoActiveActor" style="margin-top:2px" onclick="CodeBlockSettings.OnChangeAutoActiveActor"/>
        <div uiname="CodeBlockSettings.isAutoActiveActorFor" for="isAutoActiveActor" style="float:left;margin-left:5px;" >
            <%=L"当玩家进入角色的可视范围时，才运行代码"%>
        </div>
    </div>-->
    <div style="margin-bottom:10px;">
        <%=L"自动开关范围: "%>
        <input type="text" uiname="CodeBlockSettings.txtTriggerBox" EmptyText="~ ~ ~ (dx dy dz)" name="txtTriggerBox" style="height:23px" onchange="CodeBlockSettings.OnChangeBoxTriggerString"/>
        <div style="color:#808080;font-size:12px"><%=L"当主角进入该区域时自动启动代码方块, 离开时关闭"%></div>
    </div>
    <div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.allowClientExecution" name="allowClientExecution" style="margin-top:2px" onclick="CodeBlockSettings.OnChangeAllowClientExecution"/>
        <div uiname="CodeBlockSettings.allowClientExecutionFor"  for="allowClientExecution" style="float:left;margin-left:5px;" >
            <%=L"允许客户端执行代码"%>
        </div>
        <div style="color:#808080;font-size:12px"><%=L"通常在多人联网程序中, 客户端需要执行的代码方块会设置此项"%></div>
    </div>
    <div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.allowFastMode"  name="allowFastMode" style="margin-top:2px" onclick="CodeBlockSettings.OnChangeAllowFastMode"/>
        <div uiname="CodeBlockSettings.allowFastModeFor"  for="allowFastMode" style="float:left;margin-left:5px;" >
            <%=L"开启高性能模式（高级）"%>
        </div>
    </div>
    <div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.isOpenSource" name="isOpenSource" style="margin-top:2px" onclick="CodeBlockSettings.OnSetOpenSource"/>
        <div for="isOpenSource" uiname="CodeBlockSettings.isOpenSourceFor" style="float:left;margin-left:5px;" >
            <%=L"是否开源（只读模式下别人是否能看到代码）"%>
        </div>
    </div>
    <div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.isUseNplBlockly" name="isUseNplBlockly" style="margin-top:2px" onclick="CodeBlockSettings.OnSetUseNplBlockly"/>
        <div for="isUseNplBlockly" uiname="CodeBlockSettings.isUseNplBlocklyFor" style="float:left;margin-left:5px;" ><%=L"启用 NPL 图块编辑器"%></div>
        <input type="button" style="min-width:80px; margin-left: 10px;" class="button" uiname="CodeBlockSettings.BlockToolboxBtn" name="BlockToolboxBtn" value='<%=L"定制工具栏图块"%>' onclick="CodeBlockSettings.ClickBlockToolboxBtn"/>
    </div>
    <div style="margin-bottom:10px;">
        <input type="checkbox" uiname="CodeBlockSettings.isUseCustomBlock" name="isUseCustomBlock" style="margin-top:2px" onclick="CodeBlockSettings.OnSetUseCustomBlock"/>
        <div for="isUseCustomBlock" uiname="CodeBlockSettings.isUseCustomBlockFor" style="float:left;margin-left:5px;" ><%=L"启用定制图块(仅在 NPL 图块编辑器中生效)"%></div>
        <input type="button" style="min-width:80px; margin-left: 10px;" class="button" uiname="CodeBlockSettings.CustomBlockBtn" name="CustomBlockBtn" value='<%=L"定制图块"%>' onclick="CodeBlockSettings.ClickCustomBlockBtn"/>
    </div>
    <div style="margin-bottom:10px;">
        <input type="button" align="right" style="min-width:80px" class="button" uiname="CodeBlockSettings.close" name="close" value='<%=L"关闭"%>' onclick="ClosePage"/>
    </div>
</div>
</aries:window>
</pe:mcml>

